package com.sdw.message.pojo;

public enum UserType {

	Student(false, "student", "学生"),
	Category(true, "category", "留言建议分类者"),
	Department(true, "department", "部门领导"),
	College(true, "college","学院领导"),
	Admin(true, "admin", "admin");
	
	private UserType(boolean manager, String name, String title){
		this.manager = manager;
		this.name = name;
		this.title = title;
	}
	
	private boolean manager;
	private String title;
	private String name;
	
	public boolean isManager() {
		return manager;
	}
	public String getTitle() {
		return title;
	}
	
	public String getName() {
		return name;
	}
	public static UserType parseName(String name){
		for(UserType type : UserType.values()){
			if(name.equals(type.getName())){
				return type;
			}
		}
		return null;
	}
	
}
